#ifndef PROTOCOLMANAGER_H
#define PROTOCOLMANAGER_H

#include <QObject>
#include <QDBusConnection>
#include <QDBusContext>
#include <QDBusMessage>
#include <QDBusMetaType>
#include <QDBusServiceWatcher>
#include "statusnotifieriteminterface.h"
#include "xembedtosniproxy/statusnotifierwatcherinterface.h"
#include "statusnotifiermodel.h"
#include "snixembedproxy.h"
#include "statusnotifierwatcher.h"
#include "libukuitraymanager/systemtraymanager.h"

class ProtocolManager : public QObject
{
    Q_OBJECT
public:
    ProtocolManager();
    ~ProtocolManager();
private slots:
    void serviceChange(const QString &name, const QString &oldOwner, const QString &newOwner);
    void itemServiceRegistered(const QString &service);
    void itemServiceUnregistered(const QString &service);
private:
    void init();
    void registerWatcher(const QString& service);
    void unregisterWatcher(const QString &service);
    void newItem(const QString &service);


private:
    QStringList mServices;
    QStringList mHosts;
    QDBusServiceWatcher *mWatcher;
    QString m_hostServiceName;
    StatusNotifierWatcher *m_statusNotifierWatcherService;
    org::kde::StatusNotifierWatcher *m_statusNotifierWatcher;
    SniXembedProxy *m_xembedToSni;
    StatusNotifierModel *m_dataModel;
    SystemTrayManager *m_systemTrayManager;



};

#endif // PROTOCOLMANAGER_H
